package com.book.controller.statistic;

import com.book.core.mode.R;
import com.book.core.vo.BookCategoryLikeVO;
import com.book.service.StatisticService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/statistic")
@RestController
@RequiredArgsConstructor
public class StatisticController {
    private final StatisticService statisticService;

    @GetMapping("/book/category/like")
    public R getBookCategoryLike() {
        List<BookCategoryLikeVO> vo=statisticService.getBookCategoryLikeStatistic();
        return R.ok(vo);
    }
}
